<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm">
						<input id="packingId" name="packingId" th:value="${packingMaterial.packingId}"  type="hidden">
							<div class="form-group">	
								<label class="col-sm-3 control-label">名称：</label>
								<div class="col-sm-8">
									<input id="packingName" name="packingName" th:value="${packingMaterial.packingName}" class="form-control" type="text">
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">批次：</label>
								<div class="col-sm-8">
									<input id="batch" name="batch" th:value="${packingMaterial.batch}" class="form-control" type="text">
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">规格：</label>
								<div class="col-sm-8">
									<input id="specs" name="specs" th:value="${packingMaterial.specs}" class="form-control" type="text">
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">数量：</label>
								<div class="col-sm-8">
									<input id="number" name="number" th:value="${packingMaterial.number}" class="form-control" type="number">
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">单位：</label>
								<div class="col-sm-8">
									<input id="unit" name="unit" th:value="${packingMaterial.unit}" class="form-control" type="text">
								</div>
							</div>
														<!--<div class="form-group">	-->
								<!--<label class="col-sm-3 control-label">供应商id：</label>-->
								<!--<div class="col-sm-8">-->
									<!--<input id="supplierId" name="supplierId" th:value="${packingMaterial.supplierId}" class="form-control" type="text">-->
								<!--</div>-->
							<!--</div>-->
							<div class="form-group">
								<label class="col-sm-3 control-label">供应商：</label>
								<div class="col-sm-4">
									<select id="supplierId" name="supplierId" class="form-control">
									</select>
								</div>
								<div class="col-sm-4 input-group">
									<input type="text" id="supplierName" class="form-control" placeholder="搜索供应商">
									<span class="input-group-btn"> <button type="button" class="btn btn-primary" onclick="getSupplierByUpdate(null)">搜索
									</button> </span>
								</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">入库日期：</label>
								<div class="col-sm-8">
									<input id="inStockDate" name="inStockDate" th:value="${packingMaterial.inStockDate}" class="form-control" type="date">
								</div>
							</div>
														<!--<div class="form-group">	-->
								<!--<label class="col-sm-3 control-label">创建时间：</label>-->
								<!--<div class="col-sm-8">-->
									<!--<input id="createDate" name="createDate" th:value="${packingMaterial.createDate}" class="form-control" type="text">-->
								<!--</div>-->
							<!--</div>-->
														<!--<div class="form-group">	-->
								<!--<label class="col-sm-3 control-label">创建人：</label>-->
								<!--<div class="col-sm-8">-->
									<!--<input id="createBy" name="createBy" th:value="${packingMaterial.createBy}" class="form-control" type="text">-->
								<!--</div>-->
							<!--</div>-->
														<!--<div class="form-group">	-->
								<!--<label class="col-sm-3 control-label">状态 1代表删除 0代表可用：</label>-->
								<!--<div class="col-sm-8">-->
									<!--<input id="state" name="state" th:value="${packingMaterial.state}" class="form-control" type="text">-->
								<!--</div>-->
							<!--</div>-->
																					<div class="form-group">
								<div class="col-sm-8 col-sm-offset-3">
									<button type="submit" class="btn btn-primary">提交</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
	</div>
	</div>
	<div th:include="include::footer"></div>
	<script type="text/javascript" th:inline="javascript">
		function formatDate() {
			var inStockDate = [[${packingMaterial.inStockDate}]];
			if (inStockDate != null){
				inStockDate = inStockDate.substring(0,10)
			}
			$("#inStockDate").val(inStockDate);
		}

		function getSupplierId(){
			var supplierId = [[${packingMaterial.supplierId}]]
			return supplierId
		}
	</script>
	<script type="text/javascript" th:src="@{/js/appjs/material/packingMaterial/edit.js}" src="/js/appjs/material/packingMaterial/edit.js">
	</script>
</body>
</html>
